

#ifndef UD_DBGRIP_H
#define UD_DBGRIP_H

#include "zacdb.h"
#include "zacarray.h"
#include "zdbdimdata.h"


class UcGiViewport;
class UcDbEntity;
class UcDbGripData;
class UcGiWorldDraw;
class UcGiViewportDraw;
class UcDbCustomOsnapMode;

namespace UcDbGripOperations {
    enum ReturnValue {
        eOk         = 0,
        eFailure,
        eNoRedrawGrip,
        eGripHotToWarm,
        eGetNewGripPoints
    };

    enum DrawType {
        kWarmGrip  = 0,
        kHoverGrip,
        kHotGrip,
        kDragImageGrip
    };

    enum GripStatus {
        kGripStart = 0,
        kGripEnd,
        kGripAbort,
        kStretch,
        kMove,
        kRotate,
        kScale,
        kMirror,
        kDimFocusChanged,
        kPopUpMenu
    };

    enum GripFlags {
        kSkipWhenShared           = 0x1,
        kDisableRubberBandLine    = 0x2,
        kDisableModeKeywords      = 0x4,
        kDrawAtDragImageGripPoint = 0x8,
        kTriggerGrip              = 0x10,
        kTurnOnForcedPick         = 0x20,
        kMapGripHotToRtClk        = 0x40,
        kGizmosEnabled            = 0x80,
        kGripIsPerViewport        = 0x100,
        kGripEditTip              = 0x200,
		kGripIsDisabled           = 0x400,
		kGripRightClickIsNewStyle = 0x800,
		kGripSynergyPrompt        = 0x1000,
    };

    enum GripContextFlags {
        kSharedGrip    = 0x1,
        kMultiHotGrip  = 0x2
    };

    enum GetGripPointsFlags {
        kGripPointsOnly = 0x1,
        kCyclableGripsOnly = 0x02,
		kDynamicDimMode = 0x04,
		kNoMultiModesGrip = 0x08,
    };
    enum MoveGripPointsFlags {
        kOsnapped                = 0x1,
        kPolar                   = 0x2,
        kOtrack                  = 0x4,
        kZdir                    = 0x8,
        kKeyboard                = 0x10,
		kDragging                = 0x20,
    };

};

typedef UcArray<UcDbGripData*, UcArrayMemCopyReallocator<UcDbGripData*>> UcDbGripDataPtrArray;
typedef UcArray<UcDbGripData, UcArrayObjectCopyReallocator<UcDbGripData>> UcDbGripDataArray;

typedef UcDbGripOperations::ReturnValue (*GripOperationPtr)(UcDbGripData* pThis,
    const UcDbObjectId& entId, int contextFlags);

typedef void (*ContextMenuItemIndexPtr)(unsigned int itemIndex);

typedef UcDbGripOperations::ReturnValue (*GripRtClkHandler)(UcDbGripDataArray& hotGrips,
    const UcDbObjectIdArray& ents, ZTCHAR *& menuName, HMENU& menu,
    ContextMenuItemIndexPtr& cb);

typedef UcDbGripOperations::ReturnValue (*GripRightClickHandler)(UcDbGripDataArray& hotGrips,
	const UcDbObjectIdArray& ents, UcRxObject*& handler);

typedef bool (*GripWorldDrawPtr)(UcDbGripData* pThis, UcGiWorldDraw* pWd,
    const UcDbObjectId& entId, UcDbGripOperations::DrawType type,
    UcGePoint3d* imageGripPoint, double dGripSize);

typedef void (*GripViewportDrawPtr)(UcDbGripData* pThis, UcGiViewportDraw* pWd,
    const UcDbObjectId& entId, UcDbGripOperations::DrawType type,
    UcGePoint3d* imageGripPoint, int gripSize);

typedef void (*GripOpStatusPtr)(UcDbGripData* pThis, const UcDbObjectId& entId,
    UcDbGripOperations::GripStatus stat);

typedef const ZTCHAR * (*GripToolTipPtr)(UcDbGripData* pThis);

typedef const ZTCHAR * (*GripCLIPromptPtr)(UcDbGripData* pThis);

typedef const ZTCHAR * (*GripCLIDisplayStringPtr)(UcDbGripData* pThis);


typedef void (*GripDimensionPtr)(UcDbGripData* pThis, const UcDbObjectId& entId,
    double dimScale, UcDbDimDataPtrArray& dimData); 

typedef UcDbGripOperations::ReturnValue (*GripInputPointPtr)(
    UcDbGripData* pThis, const UcDbObjectId& entId, bool& changedPoint,
    UcGePoint3d& newPoint, const UcGiViewport& viewContext,
    const UcDbObjectId& viewportId, bool pointComputed, int history,
    const UcGePoint3d& lastPoint, const UcGePoint3d& rawPoint,
    const UcGePoint3d& grippedPoint, const UcGePoint3d& cartesianSnappedPoint,
    const UcGePoint3d& osnappedPoint, UcDb::OsnapMask osnapMask,
    const UcArray<UcDbCustomOsnapMode*>& customOsnapModes,
    UcDb::OsnapMask osnapOverrides,
    const UcArray<UcDbCustomOsnapMode*>& customOsnapOverrides,
    const UcArray<UcDbObjectId>& pickedEntities,
    const UcArray< UcDbObjectIdArray,
        UcArrayObjectCopyReallocator< UcDbObjectIdArray > >& nestedPickedEntities,
    const UcArray<ZSoft::GsMarker>& gsSelectionMark,
    const UcArray<UcDbObjectId>& keyPointEntities,
    const UcArray< UcDbObjectIdArray,
        UcArrayObjectCopyReallocator< UcDbObjectIdArray > >& nestedKeyPointEntities,
    const UcArray<ZSoft::GsMarker>& keyPointGsSelectionMark,
    const UcArray<UcGeCurve3d*>& alignmentPaths, const UcGePoint3d& computedPoint); 

class UcDbGripData {
public:
    UcDbGripData();
    UcDbGripData(const UcGePoint3d&, void*, GripOperationPtr hotGrip = NULL,
        GripOperationPtr hoverGrip = NULL, GripRtClkHandler RtClk = NULL,
        GripWorldDrawPtr wd = NULL, GripViewportDrawPtr vd = NULL,
        GripOpStatusPtr stat = NULL, GripToolTipPtr tt = NULL,
        GripDimensionPtr hoverDim = NULL, GripDimensionPtr hotGripDim = NULL,
        unsigned int bitFlags = 0,
        UcGePoint3d* altBasePt = NULL, GripInputPointPtr inputPointFunc = NULL);

    UcDbGripData(const UcGePoint3d&, void*, UcRxClass*,
        GripOperationPtr hotGrip = NULL,
        GripOperationPtr hoverGrip = NULL, GripRtClkHandler RtClk = NULL,
        GripWorldDrawPtr wd = NULL, GripViewportDrawPtr vd = NULL,
        GripOpStatusPtr stat = NULL, GripToolTipPtr tt = NULL,
        GripDimensionPtr hoverDim = NULL, GripDimensionPtr hotGripDim = NULL,
        unsigned int bitFlags = 0,
        UcGePoint3d* altBasePt = NULL, GripInputPointPtr inputPointFunc = NULL);

    ~UcDbGripData() {}

    UcDbGripData(const UcDbGripData&);

    UcDbGripData&             operator = (const UcDbGripData&);

    void                      setAllData(const UcGePoint3d&, void*,
        GripOperationPtr hotGrip = NULL, GripOperationPtr hoverGrip = NULL,
        GripRtClkHandler RtClk = NULL, GripWorldDrawPtr wd = NULL,
        GripViewportDrawPtr vd = NULL, GripOpStatusPtr stat = NULL,
        GripToolTipPtr tt = NULL, GripDimensionPtr hoverDim = NULL,
        GripDimensionPtr hotGripDim = NULL,
        unsigned int bitFlags = 0, UcGePoint3d* altBasePt = NULL,
        GripInputPointPtr inputPointFunc = NULL,
        UcRxClass* appDataUcRxClass = NULL);

    const UcGePoint3d&        gripPoint() const;
    void                      setGripPoint(const UcGePoint3d& pt);

    void*                     appData() const;
    void                      setAppData(void* appData);

    UcRxClass*                appDataUcRxClass() const;
    void                      setAppDataUcRxClass(UcRxClass* pClass);

    GripOperationPtr          hotGripFunc() const;
    void                      setHotGripFunc(GripOperationPtr pFunc);

    GripOperationPtr          hoverFunc() const;
    void                      setHoverFunc(GripOperationPtr pFunc);
    
    GripRtClkHandler          rtClk() const;
    void                      setRtClk(GripRtClkHandler pFunc);
    
	GripRightClickHandler     righClick() const;
	void                      setRightClick(GripRightClickHandler pFunc);

    GripWorldDrawPtr          worldDraw() const;
    void                      setWorldDraw(GripWorldDrawPtr pFunc);
    
    GripViewportDrawPtr       viewportDraw() const;
    void                      setViewportDraw(GripViewportDrawPtr pFunc);
    
    GripOpStatusPtr           gripOpStatFunc() const;
    void                      setGripOpStatFunc(GripOpStatusPtr pFunc);

    GripToolTipPtr            toolTipFunc() const;
    void                      setToolTipFunc(GripToolTipPtr pFunc);

    GripDimensionPtr          hoverDimensionFunc() const;
    void                      setHoverDimensionFunc(GripDimensionPtr pFunc);

    GripDimensionPtr          hotGripDimensionFunc() const;
    void                      setHotGripDimensionFunc(GripDimensionPtr pFunc);

    UcGePoint3d*              alternateBasePoint() const;
    void                      setAlternateBasePoint(UcGePoint3d* altBasePt);

	GripCLIPromptPtr          getCLIPromptFunc()const;
	void                      setCLIPromptFunc(GripCLIPromptPtr pFunc);

	GripCLIDisplayStringPtr   getCLIDisplayStringFunc()const;
	void                      setCLIDisplayStringFunc(GripCLIDisplayStringPtr pFunc);

    unsigned int              bitFlags() const;
    void                      setBitFlags(unsigned int flags);

    bool                      skipWhenShared() const;
    void                      setSkipWhenShared(bool skip);

    bool                      isRubberBandLineDisabled() const;
    void                      disableRubberBandLine(bool disable);

    bool                      areModeKeywordsDisabled() const;
    void                      disableModeKeywords(bool disable);

    bool                      drawAtDragImageGripPoint() const;
    void                      setDrawAtDragImageGripPoint(bool atDragPoint);

    bool                      triggerGrip() const;
    void                      setTriggerGrip(bool trigger);

    GripInputPointPtr         inputPointFunc() const;
    void                      setInputPointFunc(GripInputPointPtr pFunc);

    bool                      forcedPickOn() const;
    void                      setForcedPickOn(bool on);

    bool                      mapGripHotToRtClk() const;
    void                      setMapGripHotToRtClk(bool on);

    bool                      gizmosEnabled() const;
    void                      setGizmosEnabled(bool on);

    bool                      gripIsPerViewport() const;
    void                      setGripIsPerViewport(bool on);

	bool                      gripIsDisabled() const;
	void                      disableGrip(bool disable);

	bool                      gripRightClickIsNewStyle() const;
private:
    UcGePoint3d         m_gripPt;
    UcGePoint3d*        m_pAltBasePt;
    void*               m_pAppData;
    GripOperationPtr    m_pHotGripFunc;
    GripOperationPtr    m_pHoverFunc;
	union {
		GripRtClkHandler oldHandler;
		GripRightClickHandler newHandler;
	} m_pRtClk;
    GripWorldDrawPtr    m_pWorldDraw;
    GripViewportDrawPtr m_pViewportDraw;
    GripOpStatusPtr     m_pGripOpStatFunc;
    GripToolTipPtr      m_pToolTipFunc;
    GripDimensionPtr    m_pHoverDimensionFunc;
    GripDimensionPtr    m_pHotGripDimensionFunc;
    unsigned int        m_bitFlags;
    GripInputPointPtr   m_pInputPointFunc;
    UcRxClass*          m_pAppDataClass;
	GripCLIPromptPtr          m_pCLIPromptFunc;
	GripCLIDisplayStringPtr   m_pCLIDisplayStringFunc;
};

inline UcDbGripData::UcDbGripData() : m_pAppData(NULL), m_pAppDataClass(NULL),
    m_pHotGripFunc(NULL), m_pHoverFunc(NULL),
    m_pWorldDraw(NULL), m_pViewportDraw(NULL), m_pGripOpStatFunc(NULL),
    m_pToolTipFunc(NULL), m_pHoverDimensionFunc(NULL),
    m_pHotGripDimensionFunc(NULL), m_bitFlags(0), m_pAltBasePt(NULL),
    m_pInputPointFunc(NULL), m_pCLIPromptFunc(NULL), m_pCLIDisplayStringFunc(NULL)
{
	setRtClk(NULL);
}

inline UcDbGripData::UcDbGripData(const UcGePoint3d& pt, void* AppData,
    GripOperationPtr hotGrip, GripOperationPtr hoverGrip,
    GripRtClkHandler RtClk, GripWorldDrawPtr wd,
    GripViewportDrawPtr vd, GripOpStatusPtr stat,
    GripToolTipPtr tt, GripDimensionPtr hoverDim,
    GripDimensionPtr hotGripDim,
    unsigned int bitFlags, UcGePoint3d* altBasePt,
    GripInputPointPtr inputPointFunc) :
    m_gripPt(pt), m_pAppData(AppData), m_pAppDataClass(NULL), m_pHotGripFunc(hotGrip),
    m_pHoverFunc(hoverGrip), m_pWorldDraw(wd),
    m_pViewportDraw(vd), m_pGripOpStatFunc(stat),
    m_pToolTipFunc(tt), m_pHoverDimensionFunc(hoverDim),
    m_pHotGripDimensionFunc(hotGripDim),
    m_bitFlags(bitFlags), m_pAltBasePt(altBasePt),
    m_pInputPointFunc(inputPointFunc), m_pCLIPromptFunc(NULL), m_pCLIDisplayStringFunc(NULL)
{
	setRtClk(RtClk);
}

inline UcDbGripData::UcDbGripData(const UcGePoint3d& pt, void* AppData,
    UcRxClass* pAppDataClass,
    GripOperationPtr hotGrip, GripOperationPtr hoverGrip,
    GripRtClkHandler RtClk, GripWorldDrawPtr wd,
    GripViewportDrawPtr vd, GripOpStatusPtr stat,
    GripToolTipPtr tt, GripDimensionPtr hoverDim,
    GripDimensionPtr hotGripDim,
    unsigned int bitFlags, UcGePoint3d* altBasePt,
    GripInputPointPtr inputPointFunc) :
    m_gripPt(pt), m_pAppData(AppData), m_pAppDataClass(pAppDataClass),
    m_pHotGripFunc(hotGrip), m_pHoverFunc(hoverGrip),
    m_pWorldDraw(wd), m_pViewportDraw(vd), m_pGripOpStatFunc(stat),
    m_pToolTipFunc(tt), m_pHoverDimensionFunc(hoverDim),
    m_pHotGripDimensionFunc(hotGripDim),
    m_bitFlags(bitFlags), m_pAltBasePt(altBasePt),
	m_pInputPointFunc(inputPointFunc), m_pCLIPromptFunc(NULL), m_pCLIDisplayStringFunc(NULL)
{
	setRtClk(RtClk);
}
inline UcDbGripData::UcDbGripData(const UcDbGripData& src)
{
    m_gripPt = src.gripPoint();
    m_pAppData = src.appData();
    m_pAppDataClass = src.appDataUcRxClass();
    m_pHotGripFunc = src.hotGripFunc();
    m_pHoverFunc = src.hoverFunc();
    m_pRtClk.oldHandler = src.rtClk();
    m_pWorldDraw = src.worldDraw();
    m_pViewportDraw = src.viewportDraw();
    m_pGripOpStatFunc = src.gripOpStatFunc();
    m_pToolTipFunc= src.toolTipFunc();
    m_pHoverDimensionFunc= src.hoverDimensionFunc();
    m_pHotGripDimensionFunc= src.hotGripDimensionFunc();
    m_bitFlags = src.bitFlags();
    m_pAltBasePt = src.alternateBasePoint();
    m_pInputPointFunc = src.inputPointFunc();
	m_pCLIPromptFunc = src.getCLIPromptFunc();
	m_pCLIDisplayStringFunc = src.getCLIDisplayStringFunc();
}

inline UcDbGripData& UcDbGripData::operator = (const UcDbGripData& rtSide)
{
    m_gripPt = rtSide.gripPoint();
    m_pAppData = rtSide.appData();
    m_pAppDataClass = rtSide.appDataUcRxClass();
    m_pHotGripFunc = rtSide.hotGripFunc();
    m_pHoverFunc = rtSide.hoverFunc();
    m_pRtClk.oldHandler = rtSide.rtClk();
    m_pWorldDraw = rtSide.worldDraw();
    m_pViewportDraw = rtSide.viewportDraw();
    m_pGripOpStatFunc = rtSide.gripOpStatFunc();
    m_pToolTipFunc= rtSide.toolTipFunc();
    m_pHoverDimensionFunc= rtSide.hoverDimensionFunc();
    m_pHotGripDimensionFunc= rtSide.hotGripDimensionFunc();
    m_bitFlags = rtSide.bitFlags();
    m_pAltBasePt = rtSide.alternateBasePoint();
    m_pInputPointFunc = rtSide.inputPointFunc();
	m_pCLIPromptFunc = rtSide.getCLIPromptFunc();
	m_pCLIDisplayStringFunc = rtSide.getCLIDisplayStringFunc();

    return *this;
}

inline void UcDbGripData::setAllData(const UcGePoint3d& pt, void* AppData,
        GripOperationPtr hotGrip, GripOperationPtr hoverGrip,
        GripRtClkHandler RtClk, GripWorldDrawPtr wd,
        GripViewportDrawPtr vd, GripOpStatusPtr stat,
        GripToolTipPtr tt, GripDimensionPtr hoverDim,
        GripDimensionPtr hotGripDim,
        unsigned int bitFlags, UcGePoint3d* altBasePt,
        GripInputPointPtr inputPointFunc,
        UcRxClass* pAppDataClass)
{
    m_gripPt = pt;
    m_pAppData = AppData;
    m_pAppDataClass = pAppDataClass;
    m_pHotGripFunc = hotGrip;
	setRtClk(RtClk);
    m_pHoverFunc = hoverGrip;
    m_pWorldDraw = wd;
    m_pViewportDraw = vd;
    m_pGripOpStatFunc = stat;
    m_pToolTipFunc= tt;
    m_pHoverDimensionFunc = hoverDim;
    m_pHotGripDimensionFunc = hotGripDim;
    m_bitFlags = bitFlags;
    m_pAltBasePt = altBasePt;
    m_pInputPointFunc = inputPointFunc;
}

inline const UcGePoint3d&
UcDbGripData::gripPoint() const
{
    return m_gripPt;
}

inline void
UcDbGripData::setGripPoint(const UcGePoint3d& pt)
{
    m_gripPt = pt;
}

inline void*
UcDbGripData::appData() const
{
    return m_pAppData;
}

inline void
UcDbGripData::setAppData(void* appData)
{
    m_pAppData = appData;
}

inline UcRxClass*
UcDbGripData::appDataUcRxClass() const
{
    return m_pAppDataClass;
}

inline void
UcDbGripData::setAppDataUcRxClass(UcRxClass* appDataClass)
{
    m_pAppDataClass = appDataClass;
}

inline GripOperationPtr
UcDbGripData::hotGripFunc() const
{
    return m_pHotGripFunc;
}

inline void
UcDbGripData::setHotGripFunc(GripOperationPtr pFunc)
{
    m_pHotGripFunc = pFunc;
}

inline GripOperationPtr
UcDbGripData::hoverFunc() const
{
    return m_pHoverFunc;
}

inline void
UcDbGripData::setHoverFunc(GripOperationPtr pFunc)
{
    m_pHoverFunc = pFunc;
}

inline GripRtClkHandler
UcDbGripData::rtClk() const
{
    return m_pRtClk.oldHandler;
}

inline void
UcDbGripData::setRtClk(GripRtClkHandler pFunc)
{
	m_bitFlags &= ~UcDbGripOperations::kGripRightClickIsNewStyle;
	m_pRtClk.oldHandler = pFunc;
}

inline
GripRightClickHandler UcDbGripData::righClick() const
{
	return m_pRtClk.newHandler;
}

inline 
void UcDbGripData::setRightClick(GripRightClickHandler pFunc)
{
	m_bitFlags |= UcDbGripOperations::kGripRightClickIsNewStyle;
	m_pRtClk.newHandler = pFunc;
}


inline GripWorldDrawPtr
UcDbGripData::worldDraw() const
{
    return m_pWorldDraw;
}

inline void
UcDbGripData::setWorldDraw(GripWorldDrawPtr pFunc)
{
    m_pWorldDraw = pFunc;
}

inline GripViewportDrawPtr
UcDbGripData::viewportDraw() const
{
    return m_pViewportDraw;
}

inline void
UcDbGripData::setViewportDraw(GripViewportDrawPtr pFunc)
{
    m_pViewportDraw = pFunc;
}

inline GripOpStatusPtr
UcDbGripData::gripOpStatFunc() const
{
    return m_pGripOpStatFunc;
}

inline void
UcDbGripData::setGripOpStatFunc(GripOpStatusPtr pFunc)
{
    m_pGripOpStatFunc = pFunc;
}
 
inline GripToolTipPtr
UcDbGripData::toolTipFunc() const
{
    return m_pToolTipFunc;
}

inline void
UcDbGripData::setToolTipFunc(GripToolTipPtr pFunc)
{
    m_pToolTipFunc = pFunc;
}

inline GripDimensionPtr
UcDbGripData::hoverDimensionFunc() const
{
    return m_pHoverDimensionFunc;
}

inline void
UcDbGripData::setHoverDimensionFunc(GripDimensionPtr pFunc)
{
    m_pHoverDimensionFunc = pFunc;
}

inline GripDimensionPtr
UcDbGripData::hotGripDimensionFunc() const
{
    return m_pHotGripDimensionFunc;
}

inline void
UcDbGripData::setHotGripDimensionFunc(GripDimensionPtr pFunc)
{
    m_pHotGripDimensionFunc = pFunc;
}

inline UcGePoint3d*
UcDbGripData::alternateBasePoint() const
{
    return m_pAltBasePt;
}

inline void
UcDbGripData::setAlternateBasePoint(UcGePoint3d* altBasePt)
{
    m_pAltBasePt = altBasePt;
}

inline unsigned int
UcDbGripData::bitFlags() const
{
    return m_bitFlags;
}

inline void
UcDbGripData::setBitFlags(unsigned int flags)
{
    m_bitFlags = flags;
}

inline bool
UcDbGripData::skipWhenShared() const
{
    return !!(m_bitFlags & UcDbGripOperations::kSkipWhenShared);
}

inline void
UcDbGripData::setSkipWhenShared(bool skip)
{
    if (skip)
        m_bitFlags |= UcDbGripOperations::kSkipWhenShared;
    else
        m_bitFlags &= ~UcDbGripOperations::kSkipWhenShared;
}

inline bool
UcDbGripData::isRubberBandLineDisabled() const
{
    return !!(m_bitFlags & UcDbGripOperations::kDisableRubberBandLine);
}

inline void
UcDbGripData::disableRubberBandLine(bool disable)
{
    if (disable)
        m_bitFlags |= UcDbGripOperations::kDisableRubberBandLine;
    else
        m_bitFlags &= ~UcDbGripOperations::kDisableRubberBandLine;
}

inline bool
UcDbGripData::areModeKeywordsDisabled() const
{
    return !!(m_bitFlags & UcDbGripOperations::kDisableModeKeywords);
}

inline void
UcDbGripData::disableModeKeywords(bool disable)
{
    if (disable)
        m_bitFlags |= UcDbGripOperations::kDisableModeKeywords;
    else
        m_bitFlags &= ~UcDbGripOperations::kDisableModeKeywords;
}

inline bool
UcDbGripData::drawAtDragImageGripPoint() const
{
    return !!(m_bitFlags & UcDbGripOperations::kDrawAtDragImageGripPoint);
}

inline void
UcDbGripData::setDrawAtDragImageGripPoint(bool atDragPoint)
{
    if (atDragPoint)
        m_bitFlags |= UcDbGripOperations::kDrawAtDragImageGripPoint;
    else
        m_bitFlags &= ~UcDbGripOperations::kDrawAtDragImageGripPoint;
}

inline bool
UcDbGripData::triggerGrip() const
{
    return !!(m_bitFlags & UcDbGripOperations::kTriggerGrip);
}

inline void
UcDbGripData::setTriggerGrip(bool trigger)
{
    if (trigger)
        m_bitFlags |= UcDbGripOperations::kTriggerGrip
            | UcDbGripOperations::kSkipWhenShared;
    else
        m_bitFlags &= ~(UcDbGripOperations::kTriggerGrip
            | UcDbGripOperations::kSkipWhenShared);
}

inline GripInputPointPtr
UcDbGripData::inputPointFunc() const
{
    return m_pInputPointFunc;
}

inline void
UcDbGripData::setInputPointFunc(GripInputPointPtr pFunc)
{
    m_pInputPointFunc = pFunc;
}

inline bool
UcDbGripData::forcedPickOn() const
{
    return !!(m_bitFlags & UcDbGripOperations::kTurnOnForcedPick);
}

inline void
UcDbGripData::setForcedPickOn(bool on)
{
    if (on)
        m_bitFlags |= UcDbGripOperations::kTurnOnForcedPick;
    else
        m_bitFlags &= ~UcDbGripOperations::kTurnOnForcedPick;
}

inline bool
UcDbGripData::mapGripHotToRtClk() const
{
    return !!(m_bitFlags & UcDbGripOperations::kMapGripHotToRtClk);
}

inline void
UcDbGripData::setMapGripHotToRtClk(bool on)
{
    if (on)
        m_bitFlags |= UcDbGripOperations::kMapGripHotToRtClk;
    else
        m_bitFlags &= ~UcDbGripOperations::kMapGripHotToRtClk;
}

inline bool
UcDbGripData::gizmosEnabled() const
{
    return !!(m_bitFlags & UcDbGripOperations::kGizmosEnabled);
}

inline void
UcDbGripData::setGizmosEnabled(bool on)
{
    if (on)
        m_bitFlags |= UcDbGripOperations::kGizmosEnabled;
    else
        m_bitFlags &= ~UcDbGripOperations::kGizmosEnabled;
}

inline bool
UcDbGripData::gripIsPerViewport() const
{
    return !!(m_bitFlags & UcDbGripOperations::kGripIsPerViewport);
}

inline void
UcDbGripData::setGripIsPerViewport(bool on)
{
    if (on)
        m_bitFlags |= UcDbGripOperations::kGripIsPerViewport;
    else
        m_bitFlags &= ~UcDbGripOperations::kGripIsPerViewport;
}

inline 
bool UcDbGripData::gripIsDisabled() const
{
	return !!(m_bitFlags & UcDbGripOperations::kGripIsDisabled);
}

inline 
void UcDbGripData::disableGrip(bool disable)
{
	if (disable)
		m_bitFlags |= UcDbGripOperations::kGripIsDisabled;
	else
		m_bitFlags &= ~UcDbGripOperations::kGripIsDisabled;
}

inline 
bool UcDbGripData::gripRightClickIsNewStyle() const
{
	return !!(m_bitFlags & UcDbGripOperations::kGripRightClickIsNewStyle);
}

inline 
GripCLIPromptPtr UcDbGripData::getCLIPromptFunc() const
{
	return m_pCLIPromptFunc;
}

inline 
void UcDbGripData::setCLIPromptFunc(GripCLIPromptPtr pFunc)
{
	m_pCLIPromptFunc = pFunc;
}

inline 
GripCLIDisplayStringPtr UcDbGripData::getCLIDisplayStringFunc() const
{
	return m_pCLIDisplayStringFunc;
}

inline 
void UcDbGripData::setCLIDisplayStringFunc(GripCLIDisplayStringPtr pFunc)
{
	m_pCLIDisplayStringFunc = pFunc;
}

#endif 



